Previous Book Contents Book Index Next

Inside Macintosh: QuickDraw GX Objects /
Chapter 3 - Style Objects / Style Objects Reference
Functions / Creating and Manipulating Style Objects


GXCloneStyle

You can use the GXCloneStyle function to clone a style object--that is, to add a reference to it and increment its owner count.

gxStyle GXCloneStyle(gxStyle source);
source
A reference to the style to clone.
function result
A reference to the cloned style.
DESCRIPTION
The GXCloneStyle function increments the owner count of the style referenced in the source parameter. You typically use this function when you want to create another reference to an existing style rather than creating a distinct copy of the style.

This function returns as its function result a reference to the style--the same reference you pass in as the source parameter. The only other action that GXCloneStyle performs is to increment the style's owner count.

ERRORS, WARNINGS, AND NOTICES
Errors 
style_is_nil 
SEE ALSO
Owner counts for style objects are discussed in the section "Copying, Comparing, and Cloning Style Objects" beginning on page 3-8, and in the section "Manipulating a Style Object's Owner Count" beginning on page 3-11.

To examine the owner count of a style, use the GXGetStyleOwners function, described on page 3-22. To decrement the owner count of a style, use the GXDisposeStyle function, described on page 3-17.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
7 JUL 1996